class RightUtil
  def self.filterRight(userRights , controllerName , actionName)
    begin
      if userRights==nil
        return false
      elsif userRights.length==0
        return false
      end
      local_rights = userRights.find_all{|right| right.controller_name=="#{controllerName}" and right.action_name = "#{actionName}"}
      if local_rights.length ==0
        return false
      else
        return true
      end
    rescue Exception => e
      logger.error("RightUtil filterRight Error:")
      logger.error(e)
      logger.error  e
    end
  end
end